﻿using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleOrmCFPC.Tests.acceptance
{
    public class EntityWithAttribute
    {
        [PrimaryKey, NotNull]
        public int Id { get; set; }

        [NotNull]
        public int Age { get; set; }

        [MaxLength(200)]
        public string Name { get; set; }

        public string Lastname { get; set; }
    }

    [Entity]
    public class Person
    {
        [PrimaryKey, AutoIncrement]
        public int Id { get; set; }

        public string Name { get; set; }
        public int Age { get; set; }
        public byte[] Image { get; set; }
    }

    [Entity]
    public class Family
    {
        [PrimaryKey, AutoIncrement]
        public int Id { get; set; }

        public string Name { get; set; }

        [ManyToOne]
        public PersonExtended Chief { get; set; }
    }

    [Entity]
    public class PersonExtended
    {
        [PrimaryKey, AutoIncrement]
        public int Id { get; set; }

        public string Name { get; set; }
        [ManyToOne]
        public Address Address { get; set; }
    }

    [Entity]
    public class Address
    {
        [PrimaryKey, AutoIncrement]
        public int Id { get; set; }

        public int StreetNumber { get; set; }
        public string StreetName { get; set; }
    }
}
